<?php


class Application_Form_TestCase extends EW_Form_DbObject {

    protected function _initialize() {
        // Set the method for the display form to POST
        $this->setMethod(self::METHOD_POST);
        
        /**
         * Hidden Fields
         */
        $this->addElement('hidden', 'id', array('value'=>0));
        $this->addElement('hidden', 'projects_id', array('value'=>0));
        
        // Add an title element
        $this->addElement('text', 'label', array(
            'label'      => 'Title:',
            'required'   => true,
            'filters'    => array('StringTrim'),
            'validators' => array()
        ));
        
        // Add an file upload element
        $this->addElement('file', 'file', array(
            'label'      => 'File:',
            'required'   => true,
            'filters'    => array(),
            'validators' => array(array('Extension', false, 'xml'))
        ));
        
        // Add the submit button
        $this->addElement('submit', 'submit', array(
            'ignore'   => true,
            'label'    => 'Save',
        ));
    }
    //===============================================================================
    
    /**
     * @see EW_Form_DbObject::_beforeSave()
     */
    protected function _beforeSave() {
    
    }
    //================================================================================
    
    /**
     * 
     * @see EW_Form_DbObject::_afterSave()
     */
    protected function _afterSave() {
        
    }
    //================================================================================
    
    /**
     * Initialize decorators
     */
    protected function _initDecorators() {
        
    }
    //================================================================================
    
    
}
